Range
Function
This API is used to get the parameter range of Event Settings(cloud 专用) > Plan(Old Style).
Note:
The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.
Request Message
Table 1
| Parameter | Range | Type | Description |
|---|---|---|---|
| type | "SoundDetection" | string | Intelligent type. |
| Sample: |
POST /API/Schedules/OldStyle/Range HTTP/1.1
{
"data": {
"type": "SoundDetection"
}
}
Response Message
Parameter Description
Table 2
| Parameter | Range | Type | Description |
|---|---|---|---|
| channel_max | int | Maximum number of channels. | |
| channel_info | JSON Object | Channel info object, see Table 3 for more information. |
Table 3
| Parameter | Range | Type | Description |
|---|---|---|---|
| CH1 | Json Object | Channel object, see Table 4 for more information. | |
| IP_CH1 | Json Object | ||
| WIFI_CH1 | Json Object |
Table 4
| Parameter | Range | Type | Description |
|---|---|---|---|
| time_schedule | array | see Table 5 for more information. |
Table 5
| Parameter | Range | Type | Description |
|---|---|---|---|
| day | "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" | string | |
| time | 0: close the time period 1: open the time period | array | Each array bit represents half an hour. |
Sample:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"channel_max": 64,
"channel_info": {
"type": "object",
"items": {
"CH3": {
"type": "object",
"items": {
"time_schedule": {
"type": "array",
"min_size": 0,
"max_size": 64,
"items": [
{
"type": "array",
"min_size": 0,
"max_size": 7,
"items": [
{
"day": {
"type": "string",
"items": [
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
]
},
"time": {
"type": "array",
"min_size": 0,
"max_size": 48,
"items": {
"type": "int32",
"min": 0,
"max": 1
}
}
}
]
}
]
}
}
}
}
}
}
}
Error Code
See Response Messages Body and Common error_code for more information.